/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.edu.fatec.ads.bo;

import br.edu.fatec.ads.classes.Idioma;
import br.edu.fatec.ads.dao.HibernateGenericDAO;
import java.util.List;

/**
 *
 * @author Ubirajara
 */
public class BusinessObjectIdioma implements IBusinessObject{

    private HibernateGenericDAO dao = null;

    public BusinessObjectIdioma() {
        dao = new HibernateGenericDAO(Idioma.class);
    }

    public void beginTransaction() {
        dao.beginTransaction();
    }

    public void commitTransaction() {
        dao.commitTransaction();
    }

    public void rollbackTransaction() {
        dao.rollbackTransaction();
    }

    public void clearSession() {
        dao.clearSession();
    }


    public List<Idioma> recuperarTodosIdiomas(){
        return dao.findByCriterion(null);
    }

}